package givenchy


class CleanJob {

    def cacheService
    //def timeout = 24*60*60*1000l // execute job once in 5 seconds
    //def timeout = 1*60*1000l // execute job once in 5 seconds
    static triggers = {
        cron name: 'CleanJob', cronExpression: "0 */5 * * * ?"
        //cron name: 'CleanJob', cronExpression: "0 * * * * ?"
     }

    def execute() {
        cacheService.syncTask()
        cacheService.syncUserLog()

        cacheService.sync() 
         
        println "execute ok !" + new Date()
    }
}
